<template>
    <el-card>
         <el-alert
            title="当前网关在线实例列表，点击查看按钮查看指定实例网关本地缓存的已发布接口信息。"
            type="warning"
            style="margin-bottom: 10px"
            >
        </el-alert>
         <el-table :data="tableData" border style="width: 100%" size="small">
            <el-table-column type="index" label="#" width="50"></el-table-column>
            <el-table-column label="IP" prop="host"></el-table-column>
            <el-table-column label="端口" prop="port"></el-table-column>
            <el-table-column label="操作"></el-table-column>
         </el-table>
    </el-card>
</template>

<script>
import { getCacheList } from '@/api/getway/cache.api'
    export default {
        data() {
            return {
                tableData: [],
                queryParams: {
                    current: 1,
                    size: 10
                }
            }
        },
        mounted() {
           this.getList();
        },
        methods: {
            async getList() {
                const result = await getCacheList(this.queryParams);
                if(result.code === 200) {
                    this.tableData = result.data;
                }
            },
        }
    }
</script>
<style lang="scss" scoped>

</style>